<template>
  <div class="home">
  
    <button @click="click">点击</button>
    
    <h1>{{message}}</h1>
    <h1>{{count}}</h1>
  </div>
</template>

<script>
// @ is an alias to /src
// import Box from "../components/ Box"
// import Message from "../components/common/message/Message"
// import Loading from "../components/common/loading/Loading"
import mixin from "../store/mixin";

export default {
  mixins:[mixin],
  name: 'Home',
  components: {
    // Message
    // Loading
  },
  computed:{
    message:function(){
      return this.$store.state.homeModule.message
    }
  },
  beforeMount(){
    // console.log(this.$route)
  },
  data(){
    return{
      show:false,
    }
  },
  methods:{
    onclcik(){
      this.$router.push(this.$routerConfig.About.path)
      // this.$message({
      //   message:"消息提示内容",
      //   type:"faild"
      // });
    },
    click(){
      // this.$store.dispatch("CHANGE_MESSAGE","新消息")
      this.changeCount(1000)
    }
  },
  mounted(){
    //自执行函数 自调用 立即执行
    // (function() {
    //   console.log("1111111")
    // })();
    

    // (async ()=>{
    //   // console.log(this)
    //   let res  = await this.$APIClient.getStoreList();
    //   console.log(res)
      
    // })();
    //   (async ()=>{
    //   // console.log(this)
    //   let res  = await this.$APIClient.getStoreList();
    //   console.log(res)
      
    // })();
    //   (async ()=>{
    //   // console.log(this)
    //   let res  = await this.$APIClient.getStoreList();
    //   console.log(res)
      
    // })()
  }
}
</script>


<style scoped>
.home
{
  padding-top: 64px;
}
</style>